<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id='app'> </div>
</body>
<script>
    let app = document.getElementById('app');
    const listCreateCreator = () => {
        let container = document.createElement('div');
        container.setAttribute('id', 'inApp');
        let li = ''
        let listElement = new Array(1000).fill('1').reduce((_, curr, index) => {
            _ += `<li>${index}</li>`
            return _
        }, li);
        container.innerHTML = listElement;
        return container;
    }

    app.append(listCreateCreator());

    setInterval(() => {
        const inApp = document.getElementById('inApp');
        inApp.remove();
        app.append(listCreateCreator());
    }, 3000);
</script>

</html>